<!DOCTYPE html>
<html>
<head>
    {{>head}}
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <!-- Main Header -->
    <header class="main-header">
        <!-- Logo -->
        <a href="/dashboard" class="logo">
            <!-- mini logo for sidebar mini 50x50 pixels -->
            <span class="logo-mini"><b>WIN</b></span>
            <!-- logo for regular state and mobile devices -->
            <span class="logo-lg"><b>{{site.title}}</b></span>
        </a>
        <!-- Header Navbar -->
        <nav class="navbar navbar-static-top" role="navigation">
            <!-- Sidebar toggle button-->
            <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
                <span class="sr-only">Toggle navigation</span>
            </a>
            <!-- Navbar Right Menu -->
            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <li><a href="#" data-toggle="modal" data-target="#shareModal"> <i class="fa fa-external-link"></i>
                        分享文章</a></li>

                    <!-- User Account Menu -->
                    <li class="dropdown user user-menu">
                        <!-- Menu Toggle Button -->
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <!-- The user image in the navbar-->
                            <img src="{{gravatar session.user.email}}" class="user-image" alt="User Image">
                            <!-- hidden-xs hides the username on small devices so only the image appears. -->
                            <span class="hidden-xs">{{session.user.username}}</span>
                        </a>
                        <ul class="dropdown-menu">
                            <!-- The user image in the menu -->
                            <li class="user-header">
                                <img src="{{gravatar session.user.email}}" class="img-circle" alt="User Image">

                                <p>
                                    {{session.user.username}}
                                    <small><b>{{timeFromNow session.user.created_time}}</b> 加入本站</small>
                                </p>
                            </li>
                            <!-- Menu Body -->
                            <li class="user-body">
                                <div class="row">
                                    <div class="col-md-12">
                                        <div class="text-center small">
                                            {{session.user.signature}}
                                        </div>
                                    </div>
                                </div>
                                <!-- /.row -->
                            </li>
                            <!-- Menu Footer-->
                            <li class="user-footer">
                                <div class="row">
                                    <div class="col-md-6">
                                        <a href="/" class="btn btn-primary btn-block"> <i class="fa fa-home"></i>
                                            返回首页</a>
                                    </div>
                                    <div class="col-md-6">
                                        <a href="/logout" class="btn btn-default btn-block"> <i
                                                class="fa fa-sign-out"></i> 退 出</a>
                                    </div>
                                </div>

                            </li>
                        </ul>
                    </li>

                </ul>
            </div>
        </nav>
    </header>
    <!-- Left side column. contains the logo and sidebar -->
    {{>dashboard-sidebar}}
    <!-- Content Wrapper. Contains page content -->
    {{>flash-message}}
    <div class="content-wrapper pad">
        {{{body}}}
    </div>
    <footer class="main-footer">
        <div class="pull-right hidden-xs">
            <b>Version</b> {{site.version}}
        </div>
        <strong>Copyright &copy; 2016 <a href="http://wincn.net">Wincn.net</a>.</strong> All
        rights
        reserved.
    </footer>
</div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"></div>

<!-- Share Modal -->
<div class="modal fade" id="shareModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <form class="margin" method="post" action="/dashboard/p/create">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">快速分享文章</h4>
                </div>
                <div class="modal-body pad">
                    <input type="hidden" name="type" value="分享">
                    <div class="form-group">
                        <label>文章链接</label>
                        <input type="text" class="form-control" id="shareUrl" name="url" required>
                    </div>
                    <div class="form-group">
                        <label>文章标题</label>
                        <input type="text" class="form-control" id="shareTitle" name="title" required>
                    </div>
                    <div class="form-group">
                        <label>文章来源</label>
                        <input type="text" class="form-control" name="source" required>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="submit" class="btn btn-primary">提交</button>
                </div>
            </form>
        </div>
    </div>
</div>
{{>js}}
<script src="/js/app-dashboard.js"></script>
{{{_sections.js}}}
</body>
</html>
